Video encoders refer to devices which convert video signals conveying a huge amount of data into compressed formats, i.e., bitstreams before storage or transmission of the video signals. The video encoders use quantization for video signal compression; the quantization technique converts a value in a particular range by using a quantization parameter in such a way that the value has a smaller range than its original range.
For example, when a large quantization parameter is used in quantization, a range of quantized values is small and thus compression performance is high, but leading to large differences between the quantized values and original signal values and thus resulting in quality degradation. On the other hand, for a small quantization parameter, the quantized values become closer to the original signal values, but compression performance is not good because of a large range of the quantized values.
For output bitstreams of video encoders, a constant bit rate (CBR) or a variable bit rate (VBR) may be used according to purpose of use. The CBR involves encoding into a predetermined number of bits during a predetermined time. The CBR is used when a limited bandwidth or storage medium is used. With the CBR, however, good quality is not guaranteed for an image having a large motion or a complicated image. On the other hand, the VBR involves encoding into a predetermined quality regardless of the characteristics of an image. The VBR is used when a sufficient bandwidth is used or such a storage medium as a digital video disk (DVD) is used.
In the CBR scheme, a bit rate control method is used for encoding into a predetermined number of bits, and a bit rate, i.e., a bit amount, is controlled by properly using a quantization parameter and a frame skip. The frame skip means skipping encoding with respect to a particular frame, when necessary.
To reduce a bit amount, a large quantization parameter and a frame skip may be used; to increase a bit amount, a small quantization parameter may be used. Since the quantization parameter has a great influence upon quality as well as a bit amount, it is important to use a proper quantization parameter. A bit rate control method for determining a quantization parameter has not yet been standardized. As a result, a bit rate control method may vary from encoder to encoder and the performance of an encoder is much affected by a bit rate control method.
A conventional bit rate control method may be roughly classified into two methods: one is determining a quantization parameter in proportional to a fullness of a buffer, that is, an occupancy rate of the buffer, and the other is calculating a complexity of an input image and assigning bits in proportional to the calculated complexity.
The former involves controlling a quantization parameter based on a current buffer state, by taking account of a remaining buffer capacity and a bandwidth of a transmission medium. This bit rate control method is generally used in test model 5 (TM5), which pertains to the moving picture experts group (MPEG), and video codec test model, near-term, version 8 (TMN8), which pertains to the video coding experts group (VCEG). The latter involves assigning bits to each unit of encoding and controlling a quantization value depending on a complexity of an image.
The former method, which controls a quantization parameter based on a current buffer state, can be simply implemented, but does not consider an image. As a result, a target bit amount may be suitable for a certain image, but not for another. Moreover, the large quality change of an image may be offensive to the eyes.
On the other hand, the latter method which assigns bits considering a complexity of an input image provides good quality while maintaining a desired bit rate, but requires complex pixel-based computations, such as calculation of an average and a variance, to analyze the complexity of the image, thereby lowering encoding speed and increasing memory consumption. Although many algorithms related to complexity analysis have already been developed, they are not viable for real-time applications due to complex computations and are hardly used in practice.